import request from '@/utils/userRequest'

export interface FormData {
    phone: string,
    password: string
}

// 登录
// /api/user/passport/login
export default {
    reqLogin(formData: FormData) {
        return request.post(`/user/passport/login`, formData)
        // return request.post(`/user/passport/login`, formData)


    },
    // 注册
    // /api/user/passport/register
    reqRegister(formData: any) {
        return request.post(`/user/passport/register`, formData)
    },

    // 获取验证码
    // /api/user/passport/sendCode/{phone}
    reqCode(phone: any) {
        return request.get(`/user/passport/sendCode/${phone}`)
    },

    // 退出登录
    // /api/user/passport/logout
    reqLogout() {
        return request.get(`/user/passport/logout`)
    }
}
